package com.wrupple.muba.catalogs.client.activity.impl;

import com.google.inject.Inject;
import com.google.inject.Provider;
import com.wrupple.muba.catalogs.client.activity.CatalogSelectionActivity;
import com.wrupple.muba.catalogs.client.activity.process.CatalogTypeSelectionActivityProcess;
import com.wrupple.muba.catalogs.client.module.services.presentation.CatalogPlaceInterpret;
import com.wrupple.muba.common.client.activity.ActivityProcess;
import com.wrupple.muba.common.client.application.DataCallback;
import com.wrupple.muba.common.domain.DesktopPlace;
import com.wrupple.muba.common.shared.State.DesktopManager;
import com.wrupple.muba.common.shared.State.ProcessManager;

public class CatalogSelectionActivityImpl extends
		AbstractCatalogActivity<ProcessManager> implements
		CatalogSelectionActivity {

	Provider<CatalogTypeSelectionActivityProcess> process;

	@Inject
	public CatalogSelectionActivityImpl(ProcessManager delegate,
			CatalogPlaceInterpret placeInterpret,
			DesktopManager dm,
			Provider<CatalogTypeSelectionActivityProcess> process) {
		super(delegate, placeInterpret, dm);
		this.process = process;
	}

	@Override
	public void getActivityProcess(DesktopPlace item,
			DataCallback<ActivityProcess> callback) {
		callback.setResultAndFinish(process.get());
	}

}
